package com.jason.bbs.article.fegin.hystrix;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.jason.bbs.article.fegin.BlockService;
import com.jason.bbs.bean.ResultJson;

@Component
public class BlockHystrix implements BlockService {
	@Value("${debug:false}")
	private boolean debug;
	@Override
	public ResultJson exitis(Integer blockId) {
		ResultJson code = new ResultJson(200, "成功");
		code.put("exitis", debug ? 100 != blockId : "error");
		return code;
	}

}
